//
//  LotteryModel.m
//  K8彩票
//
//  Created by zhoubo on 2017/6/7.
//  Copyright © 2017年 zhoubo. All rights reserved.
//

#import "LotteryModel.h"

@implementation LotteryModel

+(NSArray *)getModels
{
    //江苏快三 湖北快三 双色球 大乐透 排列三 排列五
    
    
    NSMutableArray*arr = [[NSMutableArray alloc]init];
    NSArray* imgs = @[@"fast3",@"fast3",@"fast3",@"shuangse",@"daletou",@"pailie3",@"pailie5",@"fast3",@"minute",@"hour",@"hour",@"sixLottery",@"minute",@"pk10"];
    
    

    
    NSArray* titles = @[NSLocalizedString(@"江苏快三", @"江苏快三"),NSLocalizedString(@"湖北快三", @"湖北快三"),NSLocalizedString(@"安徽快三", @"安徽快三"),NSLocalizedString(@"双色球",@"双色球"),NSLocalizedString(@"大乐透",@"大乐透"),NSLocalizedString(@"排列三", @"排列三"),NSLocalizedString(@"排列五",@"排列五"),NSLocalizedString(@"幸运快三",@"幸运快三"  ), NSLocalizedString(@"幸运分分彩",@"幸运分分彩") ,NSLocalizedString(@"重庆时时彩",@"重庆时时彩") ,NSLocalizedString(@"天津时时彩", @"天津时时彩") ,NSLocalizedString(@"香港6分彩",@"香港6分彩") ,NSLocalizedString(@"台湾5分彩",@"台湾5分彩") ,NSLocalizedString(@"北京PK10",@"北京PK10") ];

    
//    NSArray* times = @[@190,@290,@290,@490,@190,@490,@300,@300,@250,@490,@290,@290,@590,@390,@-1];
    
    for (int i = 0; i<imgs.count; i++) {
        LotteryModel* model = [[LotteryModel alloc]init];
        model.imgName = imgs[i];
        model.title = titles[i];
//        model.timeCount = ((NSNumber*)times[i]).integerValue;
        model.totalCount = model.timeCount;
        [arr addObject:model];
        
    }
    

    
    
    
    return arr;
}


+(NSArray *)getAllHallModels
{
    
    
    NSMutableArray*arr = [[NSMutableArray alloc]init];
    NSArray* imgs = @[@"fast3",@"fast3",@"fast3",@"shuangse",@"daletou",@"pailie3",@"pailie5",  @"hour",@"hour",@"hour",@"fast3",@"fast3",@"pk10",@"sixLottery",@"minute",@"minute",@"3D"];
    NSArray* titles1 = @[@"江苏快三",@"湖北快三",@"安徽快三",@"双色球",@"大乐透",@"排列三",@"排列五",@"重庆时时彩",@"天津时时彩",@"新疆时时彩",@"北京快三",@"幸运快三",@"北京PK10",@"六合彩",@"台湾5分彩",@"幸运分分彩",@"3D"];
    
    NSMutableArray* titles = [[NSMutableArray alloc]initWithCapacity:17];
    
    for (NSString* str  in titles1) {
        NSString* localstr = NSLocalizedString(str, str);
        [titles addObject:localstr];
    }
    
//    NSArray* times = @[@290,@290,@290,@490,@540,@290,@290,@490,@440,@190,@390,@490,@390,@290,@290,@190,@190];
    
//    NSArray* imgs = @[@"hour"];
//    NSArray* titles = @[@"重庆时时彩"];
//    NSArray* times = @[@290];
    
    
    for (int i = 0; i<imgs.count; i++) {
        LotteryModel* model = [[LotteryModel alloc]init];
        model.imgName = imgs[i];
        model.title = titles[i];
//        model.timeCount = ((NSNumber*)times[i]).integerValue;
        model.totalCount = model.timeCount;


        [arr addObject:model];
        
    }
    
    
    
    
    
    return arr;
}


+(NSArray *)getHighModels
{
    NSMutableArray* marr = [[NSMutableArray alloc]init];
    NSArray* imgs = @[@"fast3",@"fast3",@"fast3",@"shuangse",@"daletou",@"pailie3",@"pailie5"];
    NSArray* titles1 = @[@"江苏快三",@"湖北快三",@"安徽快三",@"双色球",@"大乐透",@"排列三",@"排列五"];
    
    NSMutableArray* titles = [[NSMutableArray alloc]initWithCapacity:17];
    
    for (NSString* str  in titles1) {
        NSString* localstr = NSLocalizedString(str, str);
        [titles addObject:localstr];
    }
    
//    NSArray* times = @[@290,@290,@290,@390,@490,@490,@190,@440,@490,@490,@390,@290];
    
    
    for (int i = 0; i<imgs.count; i++) {
        LotteryModel* model = [[LotteryModel alloc]init];
        model.imgName = imgs[i];
        model.title = titles[i];
//        model.timeCount = ((NSNumber*)times[i]).integerValue;

        [marr addObject:model];
        model.totalCount = model.timeCount;

    }
    
    return marr;
    
    
    
    
}

+(NSArray *)getLowModels
{
    NSMutableArray* marr = [[NSMutableArray alloc]init];
    NSArray* imgs = @[@"pailie3",@"pailie5"];
    NSArray* titles1 = @[@"排列三",@"排列五"];
    NSMutableArray* titles = [[NSMutableArray alloc]initWithCapacity:17];
    
    for (NSString* str  in titles1) {
        NSString* localstr = NSLocalizedString(str, str);
        [titles addObject:localstr];
    }
//    NSArray* times = @[@490,@290];
    for (int i = 0; i<imgs.count; i++) {
        LotteryModel* model = [[LotteryModel alloc]init];
        model.imgName = imgs[i];
        model.title = titles[i];
//        model.timeCountr = ((NSNumber*)times[i]).integerValue;

        [marr addObject:model];
        model.totalCount = model.timeCount;

    }
    
    return marr;
    
}


+(LotteryKinds)getkindsWithTitle:(NSString*)title
{
    if ([title isEqualToString:@"3D"]) {
        return D3;
    }
    else if (([title containsString:@"3"]||[title containsString:@"快三"]) && ![title containsString:@"Array"])
    {
        return Fast3Lottery;
    }
    else if([title containsString:@"6"])
    {
        return Hongkong6;
    }
    else if ([title containsString:@"5分"]||[title containsString:@"Tai&"])
    {
        return Taiwan5;
    }
    else if ([title containsString:@"PK10"])
    {
        return BeiJinPK10;
    }
    else if ([title containsString:@"时时"]||[title containsString:@"Hour"])
    {
        return HourLottery;
    }
    else if ([title containsString:@"分分"]||[title containsString:@"Min"])
    {
        return MinuteLottery;
    }
    else if ([title containsString:@"Array3"] || [title containsString:@"排列三"])
    {
        return Pailie3;
    }
    else if ([title containsString:@"Array5"] || [title containsString:@"排列五"])
    {
        return Pailie5;
    }
    else if ([title containsString:@"双色"]||[title containsString:@"Double"])
    {
        return Shuangse;
    }
    else if ([title containsString:@"大乐透"]||[title containsString:@"Lotto"])
    {
        return Daletou;
    }
    
    return -1;
}


@end
